package com.jic.market.controller.manage;

import com.jic.common.base.vo.RestResult;
import com.jic.market.api.manage.PatchGrouponInstDetailApi;
import com.jic.market.request.PatchGrouponInstDetailRequest;
import com.jic.market.response.PageResponse;
import com.jic.market.response.PatchGrouponInstDetailResponse;
import com.jic.market.response.PatchGrouponInstResponse;
import com.jic.market.service.PatchGrouponInstDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author guohuayong
 * @date: 2020年01月20日
 */
@Api(tags = "开团团员管理")
@RestController
@RequestMapping("/PatchGrouponInstDetail")
public class PatchGrouponInstDetailController implements PatchGrouponInstDetailApi {
    @Autowired
    private PatchGrouponInstDetailService service;

    @ApiOperation("开团团员-列表")
    @PostMapping("/query")
    @Override
    public RestResult<PageResponse<PatchGrouponInstDetailResponse>> query(@RequestBody PatchGrouponInstDetailRequest t) {
        PageResponse<PatchGrouponInstDetailResponse> response = service.query(t);

        return RestResult.success(response);
    }
}
